// BIMFACE 模型处理-图纸拆分相关接口
// https://bimface.com/docs/model-derivative/v1/api-reference/createDrawingSplitUsingPUT.html

import { SplitBeanModel } from './model/splitModel';
import  bimfaceHttp from '@/api/Bimface';

/**
 * @abstract: 发起图纸拆分
 * @description: 通过文件ID创建图纸拆分
 */
export function intiateSplit(
  fileId: number,
  params: {
    callback?: object;
  },
) {
  return bimfaceHttp.post<SplitBeanModel>({ url: `/files/${fileId}/split`, params: params });
}

/**
 * @abstract: 查询图纸拆分状态
 * @description: 通过文件ID查询图纸拆分状态
 */
export function getSplitStatus(fileId: number) {
  return bimfaceHttp.get<SplitBeanModel>({ url: `/files/${fileId}/split` });
}
